package com.sinothk.base.serialNumber.manager;

import com.sinothk.base.serialNumber.service.SerialNumberService;
import com.sinothk.special.AppConstant;
import org.springframework.stereotype.Component;

@Component
public class SerialNumberHelper {

    private static SerialNumberService component = null;

    public SerialNumberHelper(SerialNumberService myComponent) {
        component = myComponent;
    }

    public synchronized static String getSerialNumber() {
        return component.generateSerialNumberByModelCode(AppConstant.BizType.NORMAL);
    }

    public synchronized static String getSerialNumber(String moduleCode) {
        return component.generateSerialNumberByModelCode(moduleCode);
    }
}
